/*
 * @Author: xiaosihan 
 * @Date: 2021-03-28 02:25:11 
 * @Last Modified by: xiaosihan
 * @Last Modified time: 2021-08-08 22:30:40
 */

import getBrowserInfo from "get-browser-info";
import isMobile from "is-mobile";
import { configure, observable } from "mobx";

// 允许直接修改状态
configure({ enforceActions: "never" });

// 浏览器 列表
//browser: ["Safari", "Chrome", "Edge", "IE", "Firefox", "Firefox Focus", "Chromium", "Opera", "Vivaldi", "Yandex", "Arora", "Lunascape", "QupZilla", "Coc Coc", "Kindle", "Iceweasel", "Konqueror", "Iceape", "SeaMonkey", "Epiphany", "360", "360SE", "360EE", "UC", "QQBrowser", "QQ", "Baidu", "Maxthon", "Sogou", "LBBROWSER", "2345Explorer", "TheWorld", "XiaoMi", "Quark", "Qiyu", "Wechat", "Taobao", "Alipay", "Weibo", "Douban", "Suning", "iQiYi"],
// browserInfo = {
// browser: "Chrome"
// browserVersion: "83.0.4103.61"
// device: "PC"
// engine: "Blink"
// language: "zh_CN"
// os: "Windows"
// osVersion: "10.0"
// }

const globalStore = observable({
    dev: _DEV_, // 开发模式
    isMobile: isMobile(),
    browserInfo: getBrowserInfo(), //浏览器信息
    isIE: getBrowserInfo().browser === "IE",
    isFirefox: getBrowserInfo().browser === "Firefox",
    testValue1: "0", //  测试用的
    testValue2: "0", //  测试用的
    setV1(v1: string) {
        this.testValue1 = v1;
    }
});

window.globalStore = globalStore;

export default globalStore;
